package com.firewolf.rbac.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 作者：刘兴
 * 时间:19/2/13
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResponseVO {
    private String code; //状态码：200成功 ，500内部错误，403没有权限，
    private String message; //操作的结果

    public static ResponseVO ok() {
        return new ResponseVO("200", "操作成功");
    }


    public static ResponseVO ok(String message) {
        return new ResponseVO("200", message);
    }


    public static ResponseVO error() {
        return new ResponseVO("500", "操作失败");
    }


    public static ResponseVO error(String message) {
        return new ResponseVO("500", message);
    }

}
